package com.example.demo.service;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author：徐志荣
 * @Date：2023/7/25 下午 5:54
 */

@Service
public class LogService {

    //默认的
    @Transactional(propagation = Propagation.REQUIRED)
    public int add() {
        int num = 10 / 0;
        return 1;
    }
}
